import axiosInstance from './axiosInstance';
const baseUrl = "/company";

// 订阅套餐
export const subscribe = (data) => {
	// 确保data中包含hasSubscription字段，1表示已订阅
	const requestData = {
		...data,
		hasSubscription: 1
	};
	return axiosInstance.put(`${baseUrl}`, requestData);
}

// 取消订阅
export const unsubscribe = () => {
	const requestData = {
		hasSubscription: 0
	};
	return axiosInstance.put(`${baseUrl}`, requestData);
}

// 获取企业信息，包含订阅状态
export const getCompanyInfo = () => {
	return axiosInstance.get(`${baseUrl}`);
}